<template>
  <div id="app">
    <button @click="getInfo">getInfo</button>
    <PostOne />
  </div>
</template>

<script>
import PostOne from "./components/PostOne";
import { getTest } from "./api/ajax.js";
const url = "https://api.github.com/search/repositories?q=v&sort=stars";

export default {
  name: "App",
  data() {
    return {};
  },
  components: {
    PostOne
  },
  /* async mounted() {
    

    const result = await getTest(this, url);
    console.log(result);
  } */
  methods: {
    async getInfo() {
      const result = await getTest(this, url);
      console.log(result);
    }
  }
};
</script>

<style lang="less"></style>
